/*
 * @Author: ln 
 * @Date: 2018-07-09 16:20:30 
 * @Last Modified by: ln
 * @Last Modified time: 2018-12-18 16:35:21
 */
"use strict";

$(document).ready(function () {

    contDrop({
        tag: '.hw-leader-xl>li',
        drop: '.hw-leader-name',
    });

    contDrop({
        tag: '.hw-leader-new .hw-text-list2>li',
        drop: '.index-newsbox-l',
    });

    $('.hw-leader-xl>li').eq(0).addClass('cur');
    $('.hw-leader-xl>li').on('mouseenter', function() {
        $(this).addClass('cur').siblings().removeClass('cur');
        $(this).find('.hw-leader-name').slideDown().siblings().find('.hw-leader-name').slideUp();
    });
    
    overEllipsis($('.hw-tj-lbList .de'), 45);
    overEllipsis($('.hw-pie .tt'), 35);

    switchSurroundShow({
        btn: '.hw-leader-text .detail .tag',
        cont: '.hw-leader-text .detail',
        textUp: '收起 <<',
        text: '.hw-leader-text .detail .tag'
    });
    
    tabItem({
        tab: '.m-tab',
        tabHead: '.btn',
        tabCont: '.item'
    });

    jQuery(".hw-wh-lb .lbItems .a").simpleSwitch({
        prev: '.hw-wh-lb .lbBtns .lfBtn',
        next: '.hw-wh-lb .lbBtns .rtBtn',
        indy: '.hw-wh-lb .hw-banner-index .ban-dy',
        lendy: '.hw-wh-lb .hw-banner-index .ban-len',
        text: '.hw-wh-lb .lbIists .a',
		playTime:3000,
    });

    jQuery(".hw-tj-lbList").bannerRollLR({
		len:3,
		type:'right',
		moveTime:3000,
		prev:'.hw-tj-lb .hw-lbBtns .lfBtn',
		next:'.hw-tj-lb .hw-lbBtns .rtBtn'
    });

    $('.hw-xstj-lb').each(function(index, item) {
        var banner = $(item).find(".hw-pie");
        var lfBtn = $(item).find(".lfBtn");
        var rtBtn = $(item).find(".rtBtn");
        jQuery(banner).simpleSwitch({
            prev: lfBtn,
            next: rtBtn,
            playTime:5000,
        });
    });

    jQuery(".hw-lb-img .lbItems .a").simpleSwitch({
        num: '.hw-lb-img .lbNums span',
		playTime:3000,
    });
    
});
